package com.shujia.wyh.day06.homework.test7;

//怪物名字，生命值，攻击力,攻击，移动
public class Monster {
    private String name;
    private int hp;
    private int atk;

    public Monster() {
    }

    public Monster(String name, int hp, int atk) {
        this.name = name;
        this.hp = hp;
        this.atk = atk;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public int getAtk() {
        return atk;
    }

    public void setAtk(int atk) {
        this.atk = atk;
    }

    public void move() {
        System.out.println("移动");
    }

    public void attack() {
        System.out.println("怪物" + getName() + "展开攻击");
        System.out.println("当前生命值是：" + getHp());
        System.out.println("攻击力是：" + getAtk());
    }
}
